from playwright.sync_api import sync_playwright


with sync_playwright() as p:
    # headless参数为是否是无头浏览器，默认是Ture则是无头
    browser = p.chromium.launch(headless=False)  # 启动chrome浏览器
    page = browser.new_page()  # 打开一个标签页
    page.goto("https://magiskcn.com/magisk-download")  # 加载url
    title = page.title()
    print(title)
    browser.close()  # 浏览器对象
